package com.youlu.campus.entity.commission;

import lombok.Getter;
import lombok.Setter;

/**
 * 分拥配置信息
 */
@Getter
@Setter
public class SharingCommissionInfo {

    public final static Double ZERO = 0D;

    /**
     * 是否开启分拥 true
     */
    private Boolean sharingProfit = Boolean.FALSE;

    /**
     * 是否显示佣金图标 true 显示
     */
    private Boolean showCommissionIcon = Boolean.FALSE;


    /**
     * 电子证书分拥比例
     */
    private Double digitalCaSharingProfitRatio = 0D;

    /**
     * 纸质证书分拥比例
     */
    private Double paperCaSharingProfitRatio = 0D;


    /**
     * 视频订单分拥比例
     */
    private Double videoOrderSharingProfitRatio = 0D;

    /**
     * 初赛分拥比例
     */
    private Double chuSaiSharingProfitRatio = 0D;

    /**
     * 复赛分拥比例
     */
    private Double fuSaiSharingProfitRatio = 0D;

    /**
     * 决赛分拥比例
     */
    private Double jueSaiSharingProfitRatio = 0D;


    public Boolean checkMaxSharingProfitRatio(Double maxSharingProfitRatio){
       if(digitalCaSharingProfitRatio.compareTo(maxSharingProfitRatio)==1){
           return Boolean.TRUE;
       }
        if(paperCaSharingProfitRatio.compareTo(maxSharingProfitRatio)==1){
            return Boolean.TRUE;
        }

        if(videoOrderSharingProfitRatio.compareTo(maxSharingProfitRatio)==1){
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }


}
